package com.kehutong.house.enums;

import org.coraframework.util.HashID;

public enum DecoratedStasus implements HashID {

    DECORATED ("0", "已装修"),
    UNDECORATED("1", "未装修"),
    ;


    private final String id;
    private final String desc ;

    private DecoratedStasus(String id, String desc) {
        this.id = id;
        this.desc = desc ;
    }

    public static DecoratedStasus get(String desc) {
        DecoratedStasus[] decoratedStasuses = values();
        for (DecoratedStasus decoratedStasus : decoratedStasuses) {
            if (decoratedStasus.getDesc().equals(desc)) {
                return decoratedStasus;
            }
        }
        return null;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
